home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD013b.dsk
/
MATCH THE PITCH.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
2KB
|
53 lines
10 REM - MATCH THE PITCH
20 REM BY JULIE KERR 8/5/82
25 HOME
37 REM SOUND ROUTINE
40 FOR LOC = 776 TO 798
50 READ BYTE: POKE LOC,BYTE
60 NEXT LOC
70 DATA 255,255,173,48,192,136,208,5,206,9,3,240,9,202,208,245,174,8,3,7 6,10,3,96
75 REM PRINT INSTRUCTIONS
76 HOME
80 PRINT "LISTEN TO THE FIRST SOUND. THEN LISTEN"
90 PRINT "TO THE SECOND SOUND. TUNE THE SECOND"
100 PRINT "SOUND BY PRESSING <L> TO GO LOWER"
110 PRINT "AND <H> TO GO HIGHER. WHEN YOU THINK"
120 PRINT "IT'S IN TUNE, PRESS <T>."
122 PRINT "IF YOU WANT TO GO FASTER, HOLD THE"
124 PRINT "REPEAT KEY DOWN WITH THE <L> OR <H> KEY."
126 PRINT
127 PRINT "DO YOU WANT TO HEAR THE TARGET PITCH"
128 PRINT "EACH TIME?"
130 INPUT A$
132 IF A$ = "Y" OR A$ = "YES" THEN P = 1
135 REM MAKE FIRST SOUND
140 FOR T = 1 TO 1500: NEXT T
150 N = ( INT( RND(1) *100 +1)) +50
160 POKE 776,N
170 POKE 777,255
180 CALL 778
182 FOR T = 1 TO 500: NEXT T
185 REM MAKE SECOND SOUND
190 T = ( INT( RND(1) *100 +1)) +50
192 IF P = 0 THEN GOTO 200
194 POKE 776,N
196 POKE 777,100
198 CALL 778
200 POKE 776,T
210 POKE 777,100
220 CALL 778
225 REM CHANGE PITCH
230 GET C$
240 IF C$ = "H" THEN T = T -1
250 IF C$ = "L" THEN T = T +1
260 IF C$ = "T" THEN GOTO 310
270 IF T = 50 THEN T = 51
280 IF T = 150 THEN T = 149
290 GOTO 192
295 REM PRINT SCORE
310 IF T = N THEN PRINT "TUNED BY AN EXPERT!": GOTO 350
320 IF T >N -10 AND T <N +10 THEN PRINT "VERY GOOD": GOTO 350
330 IF T >N -20 AND T <N +20 THEN PRINT "YOU NEED A LITTLE MORE PRACTICE": GOTO 350
340 PRINT "PRACTICE MAKES PERFECT"
350 PRINT "THE TONE WAS "256 -N" - YOU CHOSE "256 -T
360 END